﻿using System.Collections.Generic;

namespace Framework.FSM
{
    /// <summary>
    /// 状态机接口
    /// </summary>
    public interface IFsmManager
    {
        /// <summary>
        /// 创建状态机
        /// </summary>
        /// <param name="owner">状态机拥有者</param>
        /// <param name="fsmName">状态机名称</param>
        /// <param name="states">状态集合</param>
        /// <returns>创建状态机</returns>
        IFSM CreateFsm(object owner, string fsmName, List<IFsmState> states);
        /// <summary>
        /// 获得状态机
        /// </summary>
        /// <param name="fsmName">状态机的名称</param>
        /// <returns>获得的状态机</returns>
        IFSM GetFsm(string fsmName);
        /// <summary>
        /// 是否包含状态机
        /// </summary>
        /// <param name="fsmName">状态机名称</param>
        /// <returns>是否包含状态机</returns>
        bool HasFsm(string fsmName);
        /// <summary>
        /// 销毁状态机
        /// </summary>
        /// <param name="fsmName">状态机名称</param>
        void DestroyFsm(string fsmName);
        /// <summary>
        /// 获得所有的状态机
        /// </summary>
        void GetAllFsm(ref List<IFSM> list);

        bool GetOpenAuxillaryConnection();

        void SetOpenAuxillaryConnection(bool bOpenAuxillary);
    }
}
